<template>
    <div id="app">
        <!-- 开启顶部安全区适配 -->
        <!-- <van-nav-bar safe-area-inset-top /> -->
        <router-view v-slot="{ Component }">
            <keep-alive>
                <component :is="Component" :key="$route.name" v-if="$route.meta.keepAlive" />
            </keep-alive>
            <component :is="Component" :key="$route.name" v-if="!$route.meta.keepAlive" />
        </router-view>
        <!-- 开启底部安全区适配 -->
        <van-number-keyboard safe-area-inset-bottom />
    </div>
</template>

<script>
export default {
    name: 'App'
}
</script>
